package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.PublicGroupSeniorEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author lrj
 * @date 2022/4/13 15:44
 */
@Repository
@Mapper
public interface PublicGroupSeniorDao {

    Integer insert(PublicGroupSeniorEntity publicGroup);

    Integer update(PublicGroupSeniorEntity publicGroup);

    void insertBatch(@Param("list") List<PublicGroupSeniorEntity> publicGroupSeniorEntityList);

    Integer updateBatch(@Param("list") List<PublicGroupSeniorEntity> list, @Param("corpid") String corpid);

    Integer deleteByKey(@Param("key") Long key, @Param("corpid") String corpid);

    PublicGroupSeniorEntity getByKey (@Param("key") Long key,@Param("corpid") String corpid);

    List<PublicGroupSeniorEntity> getByFormId (@Param("key") Long formId,@Param("corpid") String corpid,@Param("del") Integer del);

    Integer getEntitysCount(@Param("param")Map<String ,Object>  param);

    Integer maxLevel(@Param("formId") Long formId, @Param("corpid") String corpid);

    List<PublicGroupSeniorEntity> getByGroupName (@Param("name") String name, @Param("key") Long formId, @Param("corpid") String corpid,@Param("status") Integer status);

    List<PublicGroupSeniorEntity> findEntitys(@Param("param")Map<String, Object> param) ;

    Integer deleteByBusinessType(@Param("corpid") String corpid, @Param("businessType") Integer businessType);
}
